<?php
/**
 * Created by PhpStorm.
 * User: bolle
 * Date: 27.12.15
 * Time: 19:51
 */

namespace tbollmeier\alteraparser\io;


class StringInputStream implements InputStream
{
    private $content;
    private $pos;

    public function __construct($content)
    {
        $this->content = $content;
        $this->pos = 0;
    }

    public function hasNextChar()
    {
        return $this->pos < strlen($this->content);
    }

    public function getNextChar()
    {
        $res = $this->content[$this->pos];
        $this->pos++;

        return $res;
    }


}